package view

import (
	"vrcm/src/vrcm/common/models"
)

type ViewCheck struct {
	models.Model

	ViewId    int    `json:"view_id" gorm:"type:bigint;comment:观看id"`
	CheckInfo string `json:"check_info" gorm:"type:varchar(255);comment:观看密码 或 手机号 或者 微信企业id"`
	IsSms     int    `json:"is_sms" gorm:"type:tinyint;comment:是否短信验证 1 是 2否"`
	IsDelete  int    `json:"is_delete" gorm:"type:tinyint;comment:是否删除 1 删除"`
	CheckType int    `json:"check_type" gorm:"type:tinyint;comment:1 密码 3 手机号  5观看码 6微信"`
	UserName  string `json:"user_name" gorm:"type:varchar(50);comment:用户名"`
	Account   string `json:"account" gorm:"type:varchar(50);comment:绑定账号"`
	Desc      string `json:"desc" gorm:"type:varchar(255);comment:描述"`
	models.ModelTime
	models.ControlBy
}

func (ViewCheck) TableName() string {
	return "view_check"
}

func (e *ViewCheck) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *ViewCheck) GetId() interface{} {
	return e.Id
}

type WhiteUser struct {
	models.Model

	TenantId     string `json:"tenant_id" gorm:"type:varchar(35);comment:租户"`
	LimitId      int    `json:"limit_id" gorm:"type:bigint;comment:限制id"`
	UserId       string `json:"user_id" gorm:"type:varchar(100);comment:用户id"`
	UserName     string `json:"user_name" gorm:"type:varchar(100);comment:用户名"`
	PhoneOrEmail string `json:"phone_or_email" gorm:"column:phone_or_email; type:varchar(300);comment:手机或者邮箱哈"`
	models.ModelTime
	models.ControlBy
}

func (WhiteUser) TableName() string {
	return "white_user"
}
